package pe.edu.upc.dsd.grouponrs;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import com.google.gson.Gson;

@Path("/deals")
public class DealService {
	
	@GET
	@Path("/{id}")
	public String show(@PathParam("id") String id){
		Deal deal = new Deal();
		deal.setId("1");
		deal.setEstablecimiento("Saga-JP");
		deal.setTitulo("Oferta de Calzado para Dama a 25.00");
		deal.setFecha("30/01/2012");
		deal.setPrecio("25.00");
		
		Gson gson = new Gson();
		
		System.out.println(id);
		return gson.toJson(deal);
	}

}
